<template>
  <div>
    <h1>iframe</h1>
    <iframe ref='dom' width = "800px" height = "600px" src = "http://localhost:8080/"></iframe>
    <el-button type = "primary" @click = "start">start</el-button>
  </div>
</template>

<script>
export default {
  name: 'iframe',
  data() {
    return {
      src: 'https://fanyi.baidu.com/'
    }
  },
  mounted(){
    document.domain = "localhost"
  },
  methods:{
    start(){
      let  obj = this.$refs.dom
      console.log(obj)
    }
  }
}
</script>

<style scoped>
.content {
  width: 800px;
  height: 600px;
}
</style>
